Skip to content

[TOO-314] Tool documentation auto generation tool and replacing hardcode mdx for component based one#705

Closed
jottakka wants to merge 35 commits intomainfrom
francisco/too-314/automated-docs
Closed

[TOO-314] Tool documentation auto generation tool and replacing hardcode mdx for component based one#705
jottakka wants to merge 35 commits intomainfrom
francisco/too-314/automated-docs

Conversation

@jottakka
Copy link
Contributor

@jottakka jottakka commented Jan 23, 2026

Note

Medium Risk
Adds a new GitHub Actions automation that generates/commits docs data and rewrites integrations navigation, plus substantial UI refactors for toolkit docs pages; risk is mainly broken navigation/links or rendering regressions, not security-critical logic.

Overview
Introduces automation to regenerate toolkit JSON after Porter deploys and open a PR, including a new .github/scripts/sync-toolkit-sidebar.ts that derives integrations sidebar _meta.tsx files from data/toolkits/ (category mapping via @arcadeai/design-system, optional --prune, dry-run/verbose support) and accompanying tests/docs.

Reworks toolkit docs rendering toward component-driven pages: adds a suite of app/_components/toolkit-docs components (tools table w/ search/filter/sort/pagination + secrets indicators, MDX chunk injection w/ caching and deterministic ordering, dynamic code examples, parameters/scopes rendering, per-tool sections, and page actions like “copy page”/“edit JSON on GitHub”) with targeted unit tests and architecture docs.

Updates app UX plumbing: ScopePicker becomes a richer, optionally controlled selector with requirements summary/copy actions/pagination and secrets support, ToolInfo switches from design-system icon components to publicIconUrl images, and getDashboardUrl now normalizes base/prefix (defaulting to https://app.arcade.dev and configurable path prefix) to avoid hardcoded /dashboard paths. Also adds repo/editor ignore + watcher exclusions (.cursorignore, .vscode/settings.json, .gitignore) to reduce large-repo overhead.

Written by Cursor Bugbot for commit 1de10e6. This will update automatically on new commits. Configure here.

@vercel
Copy link

vercel bot commented Jan 23, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview, Comment Feb 5, 2026 2:13pm

Request Review

@jottakka jottakka self-assigned this Jan 27, 2026
jottakka and others added 2 commits January 30, 2026 16:05
Resolve all merge conflicts:
- Keep our scope-picker.tsx with PostHog tracking
- Keep our not-found.tsx with Suspense boundary fix
- Keep our package.json with toolkit scripts and mdx deps
- Keep next-sitemap.config.js (deleted in main)
- Merge globals.css (keyframes + nextra-steps styling)
- Merge gitignore (our additions)
list.push(toolkit);
} else {
grouped.set(category, [toolkit]);
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unreachable else branch in groupByCategory function

Low Severity

The else branch in the groupByCategory function is unreachable dead code. The function first checks if (!grouped.has(category)) and sets an empty array if the category doesn't exist. It then immediately retrieves the list with grouped.get(category). Since the category is guaranteed to exist after the first conditional, list will always be defined, making the else branch impossible to reach.

Additional Locations (1)

Fix in Cursor Fix in Web

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 3 potential issues.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

};

export default meta;
`;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Empty array produces invalid JavaScript syntax in meta generation

Low Severity

The generateCategoryMeta and generateMainMeta functions produce syntactically invalid JavaScript when given empty arrays. In generateCategoryMeta, when toolkits is empty, entries becomes an empty string, but the template still includes a trailing comma: ${entries},. This produces { , } which is invalid. Similarly in generateMainMeta, an empty categoryEntries produces a double comma between index and the separator entry. The tests for empty arrays pass only because they check string containment rather than syntax validity.

Additional Locations (1)

Fix in Cursor Fix in Web

);
}

export { CopyButton };
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unused export CopyButton from scope-picker module

Low Severity

The CopyButton component is exported but never imported by any other module. Other files use the existing CopyButton from tabbed-code-block/copy-button.tsx instead. This export clutters the module's public API and may confuse developers about which CopyButton to use.

Fix in Cursor Fix in Web


export function buildScopeDisplayItems(scopes: string[]): string[] {
return normalizeScopes(scopes);
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wrapper function buildScopeDisplayItems adds no value

Low Severity

buildScopeDisplayItems is a trivial pass-through function that only calls normalizeScopes(scopes) and returns the result. This wrapper adds unnecessary indirection without providing any additional logic or abstraction benefit.

Fix in Cursor Fix in Web

@teallarson
Copy link
Contributor

@jottakka this PR is too large to load to review.

Can you please split it so the frontend folks can review the generator code more closely? Then we can follow up with the generated code in a separate PR with a lighter review cycle.

@jottakka jottakka marked this pull request as draft February 5, 2026 19:43
@jottakka jottakka marked this pull request as draft February 5, 2026 19:43
@jottakka jottakka closed this Feb 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants